package com.ruoyi.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.app.AppSettingDB;
import com.ruoyi.system.service.admin.AdminAppSettingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/app/commonSetting")
@Slf4j
public class CommonSettingController {

    @Resource
    private AdminAppSettingService adminAppSettingService;

    @GetMapping("getSetting")
    public AjaxResult getSetting(){
        AppSettingDB item = adminAppSettingService.getAndHandleAppResult();
        return AjaxResult.success(item);
    }

}
